package com.unionpay.mpds.model;

// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * PosKey entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_POSKEY")
public class PosKey implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 8577612834164035181L;
	private String keyIndex;
	private String keyName;
	private Integer keyMkindex;
	private Integer keyKekindex;
	private String keyKek;
	private String keyMacvalue;
	private String keyPinkey;
	private String keyTrackvalue;
	private String keyTrackkey;
	private String keyMackey;
	private String keyPinvalue;

	// Constructors

	/** default constructor */
	public PosKey() {
	}

	/** minimal constructor */
	public PosKey(String keyIndex, Integer keyMkindex,
			Integer keyKekindex, String keyKek, String keyMacvalue,
			String keyPinkey, String keyTrackvalue, String keyTrackkey,
			String keyMackey, String keyPinvalue) {
		this.keyIndex = keyIndex;
		this.keyMkindex = keyMkindex;
		this.keyKekindex = keyKekindex;
		this.keyKek = keyKek;
		this.keyMacvalue = keyMacvalue;
		this.keyPinkey = keyPinkey;
		this.keyTrackvalue = keyTrackvalue;
		this.keyTrackkey = keyTrackkey;
		this.keyMackey = keyMackey;
		this.keyPinvalue = keyPinvalue;
	}

	/** full constructor */
	public PosKey(String keyIndex, String keyName, Integer keyMkindex,
			Integer keyKekindex, String keyKek, String keyMacvalue,
			String keyPinkey, String keyTrackvalue, String keyTrackkey,
			String keyMackey, String keyPinvalue) {
		this.keyIndex = keyIndex;
		this.keyName = keyName;
		this.keyMkindex = keyMkindex;
		this.keyKekindex = keyKekindex;
		this.keyKek = keyKek;
		this.keyMacvalue = keyMacvalue;
		this.keyPinkey = keyPinkey;
		this.keyTrackvalue = keyTrackvalue;
		this.keyTrackkey = keyTrackkey;
		this.keyMackey = keyMackey;
		this.keyPinvalue = keyPinvalue;
	}

	// Property accessors

	@Id
	@Column(name = "KEY_INDEX", nullable = false, length = 23)
	public String getKeyIndex() {
		return this.keyIndex;
	}

	public void setKeyIndex(String keyIndex) {
		this.keyIndex = keyIndex;
	}

	@Column(name = "KEY_NAME", length = 40)
	public String getKeyName() {
		return this.keyName;
	}

	public void setKeyName(String keyName) {
		this.keyName = keyName;
	}

	@Column(name = "KEY_MKINDEX", nullable = false)
	public Integer getKeyMkindex() {
		return this.keyMkindex;
	}

	public void setKeyMkindex(Integer keyMkindex) {
		this.keyMkindex = keyMkindex;
	}

	@Column(name = "KEY_KEKINDEX", nullable = false)
	public Integer getKeyKekindex() {
		return this.keyKekindex;
	}

	public void setKeyKekindex(Integer keyKekindex) {
		this.keyKekindex = keyKekindex;
	}

	@Column(name = "KEY_KEK", nullable = false, length = 96)
	public String getKeyKek() {
		return this.keyKek;
	}

	public void setKeyKek(String keyKek) {
		this.keyKek = keyKek;
	}

	@Column(name = "KEY_MACVALUE", nullable = false, length = 8)
	public String getKeyMacvalue() {
		return this.keyMacvalue;
	}

	public void setKeyMacvalue(String keyMacvalue) {
		this.keyMacvalue = keyMacvalue;
	}

	@Column(name = "KEY_PINKEY", nullable = false, length = 96)
	public String getKeyPinkey() {
		return this.keyPinkey;
	}

	public void setKeyPinkey(String keyPinkey) {
		this.keyPinkey = keyPinkey;
	}

	@Column(name = "KEY_TRACKVALUE", nullable = false, length = 8)
	public String getKeyTrackvalue() {
		return this.keyTrackvalue;
	}

	public void setKeyTrackvalue(String keyTrackvalue) {
		this.keyTrackvalue = keyTrackvalue;
	}

	@Column(name = "KEY_TRACKKEY", nullable = false, length = 96)
	public String getKeyTrackkey() {
		return this.keyTrackkey;
	}

	public void setKeyTrackkey(String keyTrackkey) {
		this.keyTrackkey = keyTrackkey;
	}

	@Column(name = "KEY_MACKEY", nullable = false, length = 96)
	public String getKeyMackey() {
		return this.keyMackey;
	}

	public void setKeyMackey(String keyMackey) {
		this.keyMackey = keyMackey;
	}

	@Column(name = "KEY_PINVALUE", nullable = false, length = 8)
	public String getKeyPinvalue() {
		return this.keyPinvalue;
	}

	public void setKeyPinvalue(String keyPinvalue) {
		this.keyPinvalue = keyPinvalue;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof PosKey))
			return false;
		PosKey castOther = (PosKey) other;

		return ((this.getKeyIndex() == castOther.getKeyIndex()) || (this
				.getKeyIndex() != null && castOther.getKeyIndex() != null && this
				.getKeyIndex().equals(castOther.getKeyIndex())))
				&& ((this.getKeyName() == castOther.getKeyName()) || (this
						.getKeyName() != null && castOther.getKeyName() != null && this
						.getKeyName().equals(castOther.getKeyName())))
				&& ((this.getKeyMkindex() == castOther.getKeyMkindex()) || (this
						.getKeyMkindex() != null
						&& castOther.getKeyMkindex() != null && this
						.getKeyMkindex().equals(castOther.getKeyMkindex())))
				&& ((this.getKeyKekindex() == castOther.getKeyKekindex()) || (this
						.getKeyKekindex() != null
						&& castOther.getKeyKekindex() != null && this
						.getKeyKekindex().equals(castOther.getKeyKekindex())))
				&& ((this.getKeyKek() == castOther.getKeyKek()) || (this
						.getKeyKek() != null && castOther.getKeyKek() != null && this
						.getKeyKek().equals(castOther.getKeyKek())))
				&& ((this.getKeyMacvalue() == castOther.getKeyMacvalue()) || (this
						.getKeyMacvalue() != null
						&& castOther.getKeyMacvalue() != null && this
						.getKeyMacvalue().equals(castOther.getKeyMacvalue())))
				&& ((this.getKeyPinkey() == castOther.getKeyPinkey()) || (this
						.getKeyPinkey() != null
						&& castOther.getKeyPinkey() != null && this
						.getKeyPinkey().equals(castOther.getKeyPinkey())))
				&& ((this.getKeyTrackvalue() == castOther.getKeyTrackvalue()) || (this
						.getKeyTrackvalue() != null
						&& castOther.getKeyTrackvalue() != null && this
						.getKeyTrackvalue()
						.equals(castOther.getKeyTrackvalue())))
				&& ((this.getKeyTrackkey() == castOther.getKeyTrackkey()) || (this
						.getKeyTrackkey() != null
						&& castOther.getKeyTrackkey() != null && this
						.getKeyTrackkey().equals(castOther.getKeyTrackkey())))
				&& ((this.getKeyMackey() == castOther.getKeyMackey()) || (this
						.getKeyMackey() != null
						&& castOther.getKeyMackey() != null && this
						.getKeyMackey().equals(castOther.getKeyMackey())))
				&& ((this.getKeyPinvalue() == castOther.getKeyPinvalue()) || (this
						.getKeyPinvalue() != null
						&& castOther.getKeyPinvalue() != null && this
						.getKeyPinvalue().equals(castOther.getKeyPinvalue())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getKeyIndex() == null ? 0 : this.getKeyIndex().hashCode());
		result = 37 * result
				+ (getKeyName() == null ? 0 : this.getKeyName().hashCode());
		result = 37
				* result
				+ (getKeyMkindex() == null ? 0 : this.getKeyMkindex()
						.hashCode());
		result = 37
				* result
				+ (getKeyKekindex() == null ? 0 : this.getKeyKekindex()
						.hashCode());
		result = 37 * result
				+ (getKeyKek() == null ? 0 : this.getKeyKek().hashCode());
		result = 37
				* result
				+ (getKeyMacvalue() == null ? 0 : this.getKeyMacvalue()
						.hashCode());
		result = 37 * result
				+ (getKeyPinkey() == null ? 0 : this.getKeyPinkey().hashCode());
		result = 37
				* result
				+ (getKeyTrackvalue() == null ? 0 : this.getKeyTrackvalue()
						.hashCode());
		result = 37
				* result
				+ (getKeyTrackkey() == null ? 0 : this.getKeyTrackkey()
						.hashCode());
		result = 37 * result
				+ (getKeyMackey() == null ? 0 : this.getKeyMackey().hashCode());
		result = 37
				* result
				+ (getKeyPinvalue() == null ? 0 : this.getKeyPinvalue()
						.hashCode());
		return result;
	}

}